using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;
using Cleverscape.UTorrentClient.WebClient;

namespace uTorrentNetClient.ModelDesign.Converter
{
    [ValueConversion(typeof(FilePriority), typeof(string))]
    public class FilePriorityDisplayConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            if (targetType != typeof(string))
            {
                return null;
            }
            if (value is FilePriority)
            {
                FilePriority FilePriorityToConvert = (FilePriority)value;
                switch (FilePriorityToConvert)
                {
                    case FilePriority.DontDownload:
                        return "Nicht Herunterladen";
                    case FilePriority.HighPriority:
                        return "Hoch";
                    case FilePriority.LowPriority:
                        return "Niedrig";
                    case FilePriority.NormalPriority:
                        return "Normal";
                    default:
                        break;
                }
                
            }
            return null;
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
